<template>
    <div>
         <div class="mui-card" v-for='item in mygoods' :key="item.id 

">
            <div class="mui-card-content">
                <div class="mui-card-content-inner">
        
                   <div>
                       <img style="width:40px;height:55px; " :src="item.img">
                   </div>
                   <div class="money-num">
                       <div style="margin-bottom:10px;" class="mui-ellipsis-2"><span style="font-size:12px;font-weight:bolder;" class="goodName">{{item.title}}</span></div>
                       <div style="margin-bottom:8px;display:flex; justify-content:space-between;align-items: center;">
                           <span style="color:red;">￥{{item.price}}</span>
                         
                           <span style="color:blue;" @click='del(index,item.id 

)'>删除</span>
                       </div>
                   </div>
                </div>
            </div>
		</div>

    </div>
</template>

<script>
export default{
    data() {
        return {
            mygoods:'',
        }
    },
    mounted() {
    this.$http.post('http://192.168.0.197:88/getMyGoods',{belongId:localStorage.getItem('usernumber'),status:1},{emulateJSON:true})
        .then(res=>{
            this.mygoods = res.body.data
            console.log(res.body.data)
        
        })
    },
}
</script>

<style scoped>
     .cartWord{
         text-align: center;
         position: relative;
         top:20%;
     }
     .goToShop{
         color: black;
         border: black solid 1px;
         width: 100px;
         margin-top: 10px;
         
     }
     .goodName{
        max-width: 188px;
        display: inline-block;
              
    }
    .mui-card-content-inner{
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .money-num{
        margin-left: 5px;
        display: flex;
        flex-direction: column;
    }
    .mui-numbox{
        width: 100px;
        height: 22px;
        font-size: 12px;
    }
    #test{
        font-size: 12px;
    }
</style>
